﻿using System;
using System.Threading;

//引用2命名空间
using System.Diagnostics;

using log4net;
using log4net.Config;
using System.Reflection;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            ILog log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
            log.Error("error", new Exception("发生了一个异常"));
            log.Fatal("fatal", new Exception("发生了一个致命错误"));
            log.Info("info");
            log.Debug("debug");
            log.Warn("warn");

        }

        

        //public string getCurrentCpuUsage(){
        //            return cpuCounter.NextValue()+"%";
        //}

        //public string getAvailableRAM(){
        //            return ramCounter.NextValue()+"MB";
        //} 
    }
}
